home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SPACE 1
/
SPACE - Library 1 - Volume 1.iso
/
program
/
245
/
gfatip16
/
strippat.lst
< prev
Wrap
File List
|
1988-10-10
|
821b
|
27 lines
' GFATIP16 .LST Library Source Code is Copyright 1988 Marathon Computer Press
' Procedure: Strip_file_path
' Dependencies : None
'
' This is the little piece of magic that separates the full path as passed
' to the calling application by the standard Fileselector. Close observation
' will reveal what we've done.
'
'
Procedure Strip_file_path
Local Size%
Clr Newdrive$,Newdrive%,Path$,Fsel$
Size%=Len(Nowhere$)
Currentdir$=Dir$(0)
For Strippat%=Size% To 1 Step -1
If Mid$(Nowhere$,Strippat%,1)="\" Then
Fsel$=Right$(Nowhere$,(Size%-Strippat%))
Path$=Left$(Nowhere$,(Len(Nowhere$)-Len(Fsel$)))
If Mid$(Path$,2,1)=":"
New_drive$=Left$(Path$,1)
Newdrive%=Asc(New_drive$)-Asc("A")+1
Endif
Strippat%=1
Endif
Next Strippat%
Return